package com.yuxi.controller.manager;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import com.yuxi.pubInter.exception.SkException;
import com.yuxi.pubInter.IBaseService;
import com.yuxi.pubInter.RestfulController;
import com.yuxi.dto.PartnerDTO;
import com.yuxi.dto.PartnerPageDTO;
import com.yuxi.modelExt.PartnerExt;
import com.yuxi.searchExt.PartnerSearchExt;
import com.yuxi.service.IPartnerService;
import com.yuxi.vo.PartnerDetailVO;
import com.yuxi.vo.PartnerListVO;
import com.yuxi.vo.PartnerDomainVO;
import com.yuxi.vo.PartnerDetailDomainVO;

import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import com.yuxi.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-10-13 10:28:18
*    @description PartnerController      合同伙伴
*/
@Api(tags = "后台管理系统-合同伙伴相关", description = "合同伙伴相关接口")
@RestController(value ="partnerRestfulController")
@RequestMapping("/manager/partner/")
@Validated
public class PartnerController extends ApiManageController<PartnerDTO,PartnerPageDTO,PartnerExt, PartnerSearchExt,PartnerDomainVO,PartnerDetailDomainVO,PartnerDetailVO,PartnerListVO,String> {

	@Resource(name = "partnerService")
	private IPartnerService partnerService;



	@Override
	public IBaseService<PartnerExt, PartnerSearchExt,String> getBaseService() throws SkException {
		return partnerService;
	}

	@Override
	public String getBaseRoute() {
		return "/manager/partner/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "合同伙伴";
	}


	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(partner.p_id) as countNum");
		return totalMapSet;
	}


}